//
//  YTStashTJModel.m
//  YuTang
//
//  Created by 葛悦彣 on 2024/11/13.
//

#import "YTStashTJModel.h"
#import <AVFoundation/AVFoundation.h>


@implementation YTStashOneModel
+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID":@[@"id"],
    };
}

- (CGFloat)typeNameW{
    if(_typeNameW == 0){
        _typeNameW = [DTKTool textWithtitle:self.typeName andSize:CGSizeMake(1000, 10000) andFout:kFont(16)].width + kwt(15);
        if(_typeNameW < kwt(66)){
            _typeNameW = kwt(66);
        }
    }
    return _typeNameW;
}

- (void)setIcon:(NSString *)icon{
    _icon = [icon stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

}
@end
@implementation YTStashTJModel

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"ID":@[@"id"],
    };
}

- (CGFloat)CellH{
    if([self.displayForm isEqualToString:@"1"]){///视频
        return kwt(255);
    }
    if([self.displayForm isEqualToString:@"2"]){///图文
        return kwt(145);
    }
    return kwt(145);
}

- (void)setCoverImage:(NSString *)coverImage{
    _coverImage = [coverImage stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
}

- (void)setCoverImageUrl:(NSString *)coverImageUrl{
    _coverImageUrl = [coverImageUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
}

-(void)setLearnFileUrl:(NSString *)learnFileUrl{
    _learnFileUrl = [learnFileUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

}

- (void)setLearnFileImage:(NSString *)learnFileImage{
    _learnFileImage = [learnFileImage stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

}
- (void)setLearnFile:(NSString *)learnFile{
    _learnFile = [learnFile stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

}
@end
